

#include <cpp/memory_resource.hpp>
#include <cpp/pmr/vector.hpp>
#include <cpp/pmr/string.hpp>
#include "catch.hpp"


TEST_CASE("pmr:monotonic_buffer_resource")
{
	using namespace cpp;

	cpp::pmr::vector<std::pair< cpp::pmr::string, cpp::pmr::string >> v{ cpp::pmr::get_default_resource() };

	v.emplace_back("123", "abc");

	char b[10240] = {};

	pmr::monotonic_buffer_resource buf(b,10240);

	cpp::pmr::vector<std::pair< cpp::pmr::string, cpp::pmr::string >> x{ &buf };

	for(int i = 0; i < 100; i++)
	{
		x.emplace_back("123", "abc");
	}
}


